from django.conf.urls import url
from . import views


urlpatterns = [
    # 城区列表
    url(r"^api/v1.0/areas/$",views.AreaHouseView.as_view()),

    # 发布房源和房屋搜索
    url(r"^api/v1.0/houses$",views.ShowHouseView.as_view()),


    # 上传房源图片
    # url(r"^api/v1.0/houses/[int:house_id]/images/$",views.ImageView.as_view()),
    url(r"^api/v1.0/houses/(?P<house_id>\d+)/images$",views.ImageView.as_view()),

    # 我的房源列表
    url(r"^api/v1.0/user/houses/$",views.MyHouseView.as_view()),

    # # 首页房屋推荐
    url(r"^api/v1.0/houses/index/$",views.HouseIndexView.as_view()),


    # 房源搜索
    # url(r"^api/v1.0/houses$",views.HomeSerView.as_view()),


    # 房屋详情页
    # url(r"^api/v1.0/houses/[int:house_id]/$",views.DetailView.as_view()),
    url(r"^api/v1.0/houses/(?P<house_id>\d+)/$",views.DetailView.as_view()),
]


